<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/page/common/public.jspf"%>
<%@ page import="com.hengpeng.itfints.tools.PageUtil"%>
<%
	PageUtil pageUtil = (PageUtil) request.getAttribute("PageUtil");
%>
<div id="pagination" class="pagination">
								<ul>
									<c:choose>
										<c:when test="${PageUtil.currentPage==1 }">
											<li><span name="pagebar_frist" class="current prev" title="首页">首页</span></li>
											<li><span name="pagebar_pre" class="current prev" title="上一页">上一页</span></li>
										</c:when>
										<c:otherwise>
											<li><a
												onclick="javascript:go(1,<%=pageUtil.getPageCount()%>);"
												href="javascript:void(0);" name="pagebar_frist"
												class="current prev" title="首页">首页</a></li>
											<li><a
												onclick="javascript:go(<%=(pageUtil.getCurrentPage() - 1)%>,<%=pageUtil.getPageCount()%>);"
												name="pagebar_pre" href="javascript:void(0);"
												class="current prev" title="上一页">上一页</a></li>
										</c:otherwise>
									</c:choose>
									<%
										if (pageUtil.getPageCount() <= 10) {
									%>
									<c:forEach var="index" begin="1"
										end="<%=pageUtil.getPageCount()%>">
										<c:choose>
											<c:when test="${PageUtil.currentPage ==index }">
												<li class="active"><span class="current">${index }</span></li>
											</c:when>
											<c:otherwise>
												<li><a
													onclick="javascript:go(${index },<%=pageUtil.getPageCount()%>);"
													href="javascript:void(0);" class="page-link">${index }</a></li>
											</c:otherwise>
										</c:choose>

									</c:forEach>
									<%
										} else if (pageUtil.getPageCount() > 10
												&& pageUtil.getCurrentPage() < 9) {
									%>
									<c:forEach var="index" begin="1" end="9">
										<c:choose>
											<c:when test="${PageUtil.currentPage ==index }">
												<li class="active"><span class="current">${index }</span></li>
											</c:when>
											<c:otherwise>
												<li><a
													onclick="javascript:go(${index },<%=pageUtil.getPageCount()%>);"
													href="javascript:void(0);" class="page-link">${index }</a></li>
											</c:otherwise>
										</c:choose>
									</c:forEach>
									<li class="disabled"><span class="ellipse">&hellip;</span></li>
										<li><a
											href="javascript:go(<%=pageUtil.getPageCount()%>,<%=pageUtil.getPageCount()%>);"
											class="page-link"><%=pageUtil.getPageCount()%></a></li>
									<%
										} else if (pageUtil.getPageCount() > 10
												&& pageUtil.getCurrentPage() >= 9
												&& (pageUtil.getPageCount() - pageUtil.getCurrentPage()) < 9) {
									%>
									<c:forEach var="index"
										begin="<%=pageUtil.getCurrentPage() - 1%>"
										end="<%=pageUtil.getPageCount()%>">
										<c:choose>
											<c:when test="${PageUtil.currentPage ==index }">
												<li class="active"><span class="current">${index }</span></li>
											</c:when>
											<c:otherwise>
												<li><a
													onclick="javascript:go(${index },<%=pageUtil.getPageCount()%>);"
													href="javascript:void(0);" class="page-link">${index }</a></li>
											</c:otherwise>
										</c:choose>
									</c:forEach>
									<%
										} else if (pageUtil.getPageCount() > 10
												&& pageUtil.getCurrentPage() >= 9
												&& (pageUtil.getPageCount() - pageUtil.getCurrentPage()) >= 9) {
									%>
									<c:forEach var="index" begin="<%=pageUtil.getCurrentPage() - 1%>"
										end="<%=pageUtil.getCurrentPage() + 7%>">
										<c:choose>
											<c:when test="${PageUtil.currentPage ==index }">
												<li class="active"><span class="current">${index }</span></li>
											</c:when>
											<c:otherwise>
												<li><a
													onclick="javascript:go(${index },<%=pageUtil.getPageCount()%>);"
													href="javascript:void(0);" class="page-link">${index }</a></li>
											</c:otherwise>
										</c:choose>
									</c:forEach>
									<li class="disabled"><span class="ellipse">&hellip;</span></li>
										<li><a
											href="javascript:go(<%=pageUtil.getPageCount()%>,<%=pageUtil.getPageCount()%>);"
											class="page-link"><%=pageUtil.getPageCount()%></a></li>
									<%
										}
									%>
									<%if(pageUtil.getCurrentPage()==pageUtil.getPageCount()) {%>
									<li><span name="pagebar_frist" class="current prev" title="下一页">下一页</span></li>
											<li><span name="pagebar_pre" class="current prev" title="尾页">尾页</span></li>
									<%}else{ %>
									<li><a
										onclick="javascript:go(<%=(pageUtil.getCurrentPage() + 1)%>,<%=pageUtil.getPageCount()%>);"
										href="javascript:void(0);" name="pagebar_next"
										class="page-link next" title="下一页">下一页</a></li>
									<li><a
										onclick="javascript:go(<%=pageUtil.getPageCount()%>,<%=pageUtil.getPageCount()%>);"
										href="javascript:void(0);" name="pagebar_last"
										class="page-link next" title="尾页">尾页</a></li>
										<%} %>
								</ul>
							</div>